package com.castle.fortress.admin.pay.service;

import com.castle.fortress.admin.pay.dto.PayRequest;
import com.castle.fortress.admin.pay.dto.PayResponse;
import com.castle.fortress.admin.pay.dto.RefundRequest;
import com.castle.fortress.admin.pay.dto.RefundResponse;
import com.castle.fortress.admin.pay.enums.PayTypeEnum;
import com.castle.fortress.common.entity.RespBody;

import javax.servlet.http.HttpServletRequest;


/**
 * 支付相关
 * @author castle
 */
public interface PayService {

    /**
     * 发起支付.
     */
    RespBody<PayResponse> uniorder(PayRequest request);

    /**
     * 退款
     * @param refundRequest
     * @return
     */
    RespBody<RefundResponse> refund(RefundRequest refundRequest);

    /**
     * 异步回调
     * @param request
     * @param notifyData
     * @param payType
     * @param sceneCode
     * @return
     */
    RespBody<PayResponse> asyncNotify(HttpServletRequest request, String notifyData, PayTypeEnum payType, String sceneCode);
}
